package com.demo.data;

public class Configuration {

	private String workspace;

	private String projectName;

	private String sourcePath;

	private String classesPath;

	private String outputPath;

	private String libraryPath;

	private String packageName;

	private String mainClass;

	private Configuration() {

	}

	private static class Holder {
		public static final Configuration INSTANCE = new Configuration();
	}

	public static Configuration getInstance() {
		return Holder.INSTANCE;
	}

	public String getWorkspace() {
		return workspace;
	}

	public void setWorkspace(String workspace) {
		this.workspace = workspace;
	}

	public void setWorkspace(String value, String defaultValue) {
		if (value == null || value.isEmpty()) {
			this.workspace = defaultValue;
		} else {
			this.workspace = value;
		}
	}

	public String getProjectName() {
		return projectName;
	}

	public void setProjectName(String projectName) {
		this.projectName = projectName;
	}

	public void setProjectName(String value, String defaultValue) {
		if (value == null || value.isEmpty()) {
			this.projectName = defaultValue;
		} else {
			this.projectName = value;
		}
	}

	public String getOutputPath() {
		return outputPath;
	}

	public void setOutputPath(String outputPath) {
		this.outputPath = outputPath;
	}

	public void setOutputPath(String value, String defaultValue) {
		if (value == null || value.isEmpty()) {
			this.outputPath = defaultValue;
		} else {
			this.outputPath = value;
		}
	}

	public String getSourcePath() {
		return sourcePath;
	}

	public void setSourcePath(String sourcePath) {
		this.sourcePath = sourcePath;
	}

	public void setSourcePath(String value, String defaultValue) {
		if (value == null || value.isEmpty()) {
			this.sourcePath = defaultValue;
		} else {
			this.sourcePath = value;
		}
	}

	public String getClassesPath() {
		return classesPath;
	}

	public void setClassesPath(String classesPath) {
		this.classesPath = classesPath;
	}

	public void setClassesPath(String value, String defaultValue) {
		if (value == null || value.isEmpty()) {
			this.classesPath = defaultValue;
		} else {
			this.classesPath = value;
		}
	}

	public String getLibraryPath() {
		return libraryPath;
	}

	public void setLibraryPath(String libraryPath) {
		this.libraryPath = libraryPath;
	}

	public void setLibraryPath(String value, String defaultValue) {
		if (value == null || value.isEmpty()) {
			this.libraryPath = defaultValue;
		} else {
			this.libraryPath = value;
		}
	}

	public String getPackageName() {
		return packageName;
	}

	public void setPackageName(String packageName) {
		this.packageName = packageName;
	}

	public void setPackageName(String value, String defaultValue) {
		if (value == null || value.isEmpty()) {
			this.packageName = defaultValue;
		} else {
			this.packageName = value;
		}
	}

	public String getMainClass() {
		return mainClass;
	}

	public void setMainClass(String mainClass) {
		this.mainClass = mainClass;
	}

	public void setMainClass(String value, String defaultValue) {
		if (value == null || value.isEmpty()) {
			this.mainClass = defaultValue;
		} else {
			this.mainClass = value;
		}
	}

	@Override
	public String toString() {
		return "Configuration [workspace=" + workspace + ", projectName=" + projectName + ", sourcePath=" + sourcePath
				+ ", classesPath=" + classesPath + ", outputPath=" + outputPath + ", libraryPath=" + libraryPath
				+ ", packageName=" + packageName + ", mainClass=" + mainClass + "]";
	}

}
